import request from '@/config/axios'

export interface AgentEmployeeVO {
  id: number
  agentCode: string
  systemUserCode: string
  systemUserName: String
}

// 查询代理商员工关系分页
export const getAgentEmployeePage = async (params) => {
  return await request.get({ url: `/meijia/agent-employee/page`, params })
}

// 查询代理商员工关系详情
export const getAgentEmployee = async (id: number) => {
  return await request.get({ url: `/meijia/agent-employee/get?id=` + id })
}

// 新增代理商员工关系
export const createAgentEmployee = async (data: AgentEmployeeVO) => {
  return await request.post({ url: `/meijia/agent-employee/create`, data })
}

// 修改代理商员工关系
export const updateAgentEmployee = async (data: AgentEmployeeVO) => {
  return await request.put({ url: `/meijia/agent-employee/update`, data })
}

// 删除代理商员工关系
export const deleteAgentEmployee = async (id: number) => {
  return await request.delete({ url: `/meijia/agent-employee/delete?id=` + id })
}

// 导出代理商员工关系 Excel
export const exportAgentEmployee = async (params) => {
  return await request.download({ url: `/meijia/agent-employee/export-excel`, params })
}
// 查询代理商超管员工列表
export const getAgentAdminEmployeeList = async () => {
  return await request.get({ url: `/meijia/agent-employee/get-agent-admin-employee-list` })
}
// 获得代理商非管理员员工列表
export const getNonAdminAgentEmployeeList = async (params) => {
  return await request.get({ url: `/meijia/agent-employee/get-non-admin-agent-employee-list`,params })
}
// 获取当前用户代理商信息
export const agentEmployeeByCurrentUser = async () => {
  return await request.get({ url: `/meijia/agent-employee/agent-employee-current-user` })
}